//
//  HWzuixingjiaoyidanyuanTableViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2020/12/22.
//  Copyright © 2020 Chendaobin. All rights reserved.
//

#import "HWzuixingjiaoyidanyuanTableViewCell.h"

@implementation HWzuixingjiaoyidanyuanTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    
    
   
    self.zuidadeshituView.layer.cornerRadius = 12;
    self.zuidadeshituView.layer.masksToBounds = YES;
    
    
    self.zuiwaimianView.backgroundColor = RGB(255, 255, 255);
    self.zuiwaimianView.layer.cornerRadius = 12;
    self.zuiwaimianView.layer.masksToBounds = YES;
    
    
    self.touxiangiamgeView.layer.cornerRadius = 8;
    self.touxiangiamgeView.layer.masksToBounds = YES;
    
    

    
    CGFloat  jianju = (kScreenW-3*91-24-40)/2;
    
    
    
    self.tupianImageView.backgroundColor = RGB(255, 255, 255);
    
    
    self.xiangxiico1imageView  = [[UIImageView alloc]initWithFrame:CGRectMake(20, 15, 91, 130)];
    self.xiangxiico1imageView.layer.cornerRadius = 10;
    self.xiangxiico1imageView.layer.masksToBounds = YES;
    self.xiangxiico1imageView.backgroundColor = [UIColor clearColor];
    [self.tupianImageView addSubview:self.xiangxiico1imageView];
    
    self.xiangxiico2imageView  = [[UIImageView alloc]initWithFrame:CGRectMake(20+jianju+91, 15, 91, 130)];
    self.xiangxiico2imageView.layer.cornerRadius = 10;
    self.xiangxiico2imageView.layer.masksToBounds = YES;
    self.xiangxiico2imageView.backgroundColor = [UIColor clearColor];
    [self.tupianImageView addSubview:self.xiangxiico2imageView];
    
    
    self.xiangxiico3imageView  = [[UIImageView alloc]initWithFrame:CGRectMake(20+jianju*2+91*2, 15, 91, 130)];
    self.xiangxiico3imageView.layer.cornerRadius = 10;
    self.xiangxiico3imageView.layer.masksToBounds = YES;
    self.xiangxiico3imageView.backgroundColor = [UIColor clearColor];
    [self.tupianImageView addSubview:self.xiangxiico3imageView];
    
    
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


-(void)setDataModel:(HWjiaoyuLiebiaoModel *)dataModel {
    
    
    [self.touxiangiamgeView  sd_setImageWithURL:[NSURL URLWithString:dataModel.icon] placeholderImage:nil];
    
    self.name1Label.text = [NSString stringWithFormat:@"%@",dataModel.gname];
    
     self.name2Label.text = [NSString stringWithFormat:@"%@",dataModel.sname];
    
    
      self.name3Label.text = [NSString stringWithFormat:@"%@",dataModel.create_time];
    
     self.name4Label.text = [NSString stringWithFormat:@"￥%@",dataModel.money];
    
      self.name5Label.text = [NSString stringWithFormat:@"累计充值 %@元",dataModel.pay_money];
    
    
    NSArray     *arr =  dataModel.imgs;
    
    for (int i = 0 ; i < arr.count; i++) {
        
        if (i == 0) {
            
            [self.xiangxiico1imageView sd_setImageWithURL:[NSURL URLWithString:arr[i]] placeholderImage:nil];
            
            
        } else if (i == 1) {
             [self.xiangxiico2imageView sd_setImageWithURL:[NSURL URLWithString:arr[i]] placeholderImage:nil];
            
        } else {
            
             [self.xiangxiico3imageView sd_setImageWithURL:[NSURL URLWithString:arr[i]] placeholderImage:nil];
            
        }
        
        
    }
    
    
    
    
    
}

@end
